package org.stratusdb.error;

import java.io.Serializable;

public class Error implements Serializable {

	private static final long serialVersionUID = -3687956357697885482L;

	public static final Error NO_ERROR = new Error();
	
	private EnumError type = EnumError.NO_ERROR;
	private String[] args = null;
	
	private Error(){
	}
	
	public Error(EnumError type, String[] args){
		this.type = type;
		this.args = args;
	}
	
	public boolean isError(){
		return this.type != EnumError.NO_ERROR;
	}
	
	public String toString(){
		return EnumError.toString(type, args);
	}
}
